﻿//窗体类型
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace UGUIFW
{
	public class UIInfo {
        public readonly EUIName uiName;
        public readonly string PrefabPath;
        //UI窗体类型
	    public readonly EUIBaseType UI_BaseType = EUIBaseType.Normal;
        //UI窗体透明度类型
	    public readonly EUILucenyType UI_LucencyType = EUILucenyType.Lucency;
        //附加的UI窗体
        public readonly EUIName AttachUIName;
        /// <summary>
        /// 定义UI的基本属性
        /// </summary>
        /// <param name="name"></param>
        /// <param name="prefabPath"></param>
        /// <param name="ui_BaseType">UI窗体类型</param>
        /// <param name="ui_LucencyType">UI窗体透明度类型</param>
        /// <param name="attachUIName">附加的UI窗体,主窗体显示的时候附加窗体也显示</param>
        public UIInfo(EUIName name, string prefabPath, 
            EUIBaseType ui_BaseType, 
            EUILucenyType ui_LucencyType = EUILucenyType.Pentrate,
            EUIName attachUIName = EUIName.None)
        {
            uiName = name;
            PrefabPath = prefabPath;
            UI_BaseType = ui_BaseType;
            UI_LucencyType = ui_LucencyType;
            AttachUIName = attachUIName;
            Debug.Assert(uiName != AttachUIName, "Error 这个UI的附属UI是自己,会造成死循环" + uiName.ToString());
        }
    }
}